import React from 'react';

class List extends React.Component<any,any>{
    constructor(props: any) {
        super(props);
        this.state = {
            todo:[
                '岛田半藏',
                '岛田源氏',
                '岛田轮胎',
                '岛田雾子',
            ]
        }
    }
    render(): React.ReactNode {
        let lis:Array<React.ReactNode> = this.state.todo.map((item:string,index:number) => {
            return <li key={index}>{item}</li>
        })
        return(
            <fieldset>
                <legend>循环列表</legend>
                <ul>
                    {lis}
                </ul>
            </fieldset>
        )
    }
}

export default List